package com.weiiew.buildservice.controller;

import com.weiiew.buildservice.service.BuildingServiceImpl;
import com.weiiew.common.entity.vo.BuildingVO;
import com.weiiew.common.OnlyFeign.OnlyFeign;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description
 * @Author 魏锴
 * @Date 2025/4/3
 */
@Slf4j
@OnlyFeign
@RestController
@RequestMapping("/build/feign")
@RequiredArgsConstructor
public class BuildFeignController {
    private final BuildingServiceImpl buildingService;
    @RequestMapping("/list/cost")
    public List<BuildingVO> getBuildingsByCostId(@RequestParam("id") Integer id) {
        return buildingService.getBuildingsByCostId(id);
    }
}
